<?php
/**
 * Created by PhpStorm.
 * User: 12133
 * Date: 2024/1/16
 * Time: 10:38
 */

namespace app\controller\phone;
use app\model\admin\Config AS config;

class Keyword extends Base
{
    public function index(){
        return $this->view('/phone/index');
    }
    public function search(string $keyword){
        try{
            $cookie = config::get_value('baidu_cookie');
            $keywords = new \app\service\Keyword();
            return $keywords->baidu($keyword,$cookie);
        }catch (\Exception $e){
            return [];
        }
    }
}